/* 
 * File:   keyvaluepair.h
 * Author: Stripped
 *
 * Created on April 18, 2009, 10:13 AM
 */

#ifndef _KEYVALUEPAIR_H
#define _KEYVALUEPAIR_H

template<class TKey, class TValue>
class KeyValuePair
{
public:
    TKey key;
    TValue value;

    bool operator>   (const KeyValuePair& other) const { return key >  other.key; }
    bool operator<   (const KeyValuePair& other) const { return key <  other.key; }
    bool operator>=  (const KeyValuePair& other) const { return key >= other.key; }
    bool operator<=  (const KeyValuePair& other) const { return key <= other.key; }
    bool operator==  (const KeyValuePair& other) const { return key == other.key; }
    bool operator!=  (const KeyValuePair& other) const { return key != other.key; }

    KeyValuePair& operator= (const KeyValuePair& other)
    {
        key = other.key;
        value = other.value;
        return *this;
    }

    KeyValuePair (const KeyValuePair& other)
    {
        key = other.key;
        value = other.value;
    }

    KeyValuePair ()
    {
    }

    KeyValuePair (TKey constkey)
    {
        key = constkey;
    }

    KeyValuePair (TKey constkey, TValue constvalue)
    {
        key = constkey;
        value = constvalue;
    }
}; 

#endif  /* _KEYVALUEPAIR_H */